#include "wx/wxprec.h"
#include "wx/xrc/xh_bmp.h"

IMPLEMENT_DYNAMIC_CLASS( wxBitmapXmlHandler, wxXmlResourceHandler )

wxBitmapXmlHandler::wxBitmapXmlHandler()
  : wxXmlResourceHandler() {
}

wxObject *wxBitmapXmlHandler::DoCreateResource() {
  return new wxBitmap( GetBitmap( wxEmptyString ) );
}

bool wxBitmapXmlHandler::CanHandle( wxXmlNode *node ) {
  return IsOfClass( node, wxT( "wxBitmap" ) );
}

IMPLEMENT_DYNAMIC_CLASS( wxIconXmlHandler, wxXmlResourceHandler )

wxIconXmlHandler::wxIconXmlHandler()
  : wxXmlResourceHandler() {
}

wxObject *wxIconXmlHandler::DoCreateResource() {
  return new wxIcon( GetIcon( wxEmptyString ) );
}

bool wxIconXmlHandler::CanHandle( wxXmlNode *node ) {
  return IsOfClass( node, wxT( "wxIcon" ) );
}
